<?php
header("Content-type: text/html; charset=utf-8");
require("inc/common.inc.php");
$nowdate=date("Y-m-d");
$adate=date('Y-m-d',strtotime("$nowdate -7 day"));

$pagesize=intval($pagesize);
if ($pagesize==0){$pagesize=2;}

	if(empty($pageindex)){$pageindex=1;}
    $str=" and isok='1' ";
    $s="";
	

	$table=" mx_vpp_card ";
	$order=" order by  orderid asc, adddate desc, id desc";
	$column=" * ";
	$biaoid="aid";

	$c=$db->listcount($table,$str);

	$list=$db->list1($pageindex,$pagesize,$table,$column,$str,$order,$biaoid);

	if(!is_array($list) or $c==0 and $pageindex==1){
	  echo "|@#page#@|<center>暂无信息</center>";
	  exit();
	}
	else{
		$nowhavenum=($pagesize*($pageindex-1))+count($list);
		if ($nowhavenum<$c){echo "1";}
		echo "|@#page#@|";
		
		for($i=0;$i<count($list);$i++){
		echo '<div class="box showpic" id="'.$thisindex.'"><div class="picbox"><a href="cardshow.php?id='.$list[$i]["id"].'&fromwxopenid='.$wxmxopenid.'&whref=mp.weixin.qq.com"><img class="txpic lazy" src="'.get_photourl($list[$i]["faceurl"]).'" data-original="'.get_photourl($list[$i]["faceurl"]).'" style="display: block;" /></a></div><p><a href="cardshow.php?id='.$list[$i]["id"].'&fromwxopenid='.$wxmxopenid.'">'.$list[$i]["yname"].'</a></p></div>';
		}
	}
	?>